package net.towee.model.account;

import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Container of connections to account. Each connection may be
 * phone nomber, address or email.
 * @author c58
 */
public interface ConnectionsContainer extends IsSerializable {
	/**
	 * Add new connection
	 * @param conection
	 */
	void addConnection(Connection conection);
	
	/**
	 * Remove connection by object
	 * @param connection
	 */
	void removeConnection(Connection connection);
	
	/**
	 * Remove connection by index
	 * @param index
	 */
	void removeConnection(int index);
	
	/**
	 * @param conn TODO
	 * @return connection index
	 */
	int getConnectionIndex(Connection conn);
	
	/**
	 * @return List of connections
	 */
	List<Connection> getConnectinsList();

	/**
	 * Get connection by index
	 * @param i
	 * @return
	 */
	Connection getConnection(int i);
}
